package cn.wolfcode.p2p.base.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
@Getter@Setter
public class BaseAudit extends BaseDomain {
        public static final int STATE_NORMAL=0;
        public static final int STATE_SUCCESS=1;
        public static final int STATE_REJECT=2;
        private String remark;//备注
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private Date auditTime;//审核事件
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        private Date applyTime;//提交事件

        private LoginInfo auditor;//审核人的ID

        private LoginInfo applier;//提交人
        private Integer state=STATE_NORMAL;//0待审核,1,审核通过,2审核失败
        public String getStateDisplay(){
                switch (state){
                        case STATE_NORMAL :return "待审核";
                        case STATE_REJECT :return "审核失败";
                        case STATE_SUCCESS:return "审核通过";
                }
                return "数据异常";
        }
}
